import '@/utils/request'
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPost, httpGet } = service
//工程结算
const request = {
    //根据工程结算id查询查询工程结算基本信息
    getProjectSettlementInfoData (params) {
        return httpGet({
            url: '/projectsettle/projectSettlement/findById',
            params
        })
    },
    //修改基本信息
    updateProjectSettlementInfo (params) {
        return httpPost({
            url: '/projectsettle/projectSettlement/update',
            params
        })
    },
    //根据id查询明细
    getProjectSettlementDetailed (params) {
        return httpGet({
            url: '/projectsettle/projectSettlement/listDtlsById',
            params
        })
    },
    //修改明细
    updeteProjectSettlementDetailed (params) {
        return httpPost({
            url: '/projectsettle/projectSettlement/updateList',
            params
        })
    },
    //获取明细历史数据
    getProjectSettlementHistory (params) {
        return httpPost({
            url: '/projectsettle/projectSettlement/listSettlementDtlHistory',
            params
        })
    },
    //获取汇总
    getProjectSettlementTotalList (params) {
        return httpGet({
            url: '/projectsettle/projectSettlement/summary',
            params
        })
    },
    //获取当前页面可操作按钮
    getButtons (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/getCurrentUnitInfo',
            params
        })
    },
    //发起审核
    applicationReview (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/commit',
            params
        })
    },
    //进行审核
    conductAudit (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/audit',
            params
        })
    },
    //撤回审核申请
    withdraw (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/undoAudit',
            params
        })
    },
    //删除
    deleteProjectSettle (params) {
        return httpGet({
            url: '/projectsettle/projectSettlement/realDelete',
            params
        })
    },
    //作废
    abolishProjectSettle (params) {
        return httpPost({
            url: '/projectsettle/common/nullify',
            params
        })
    },
    //获取获取审核中历史修改数据
    getUnderReviewHistoryData (params) {
        return httpGet({
            url: '/projectsettle/common/listFieldValueChangeHistoryInApprovalByBillId',
            params
        })
    },
    //更新审核中变更历史
    setUnderReviewHistoryData (params) {
        return httpPost({
            url: '/projectsettle/common/updateFieldValueChangeHistoryInApproval',
            params
        })
    },
    //根据合同中的乙方id获取对应外包方信息
    getSecondPartyData (params) {
        return httpPost({
            url: '/outer/outer/get/connect/outer',
            params
        })
    },
    // 验证外包方是否符合要求（过期、是不是D级）
    getSecondPartyState (params) {
        return httpGet({
            url: '/outer/outer/get/by/code/check/credit/code',
            params
        })
    },
    // 查询当前合同期数
    getNextPeriod (params) {
        return httpGet({
            url: '/projectsettle/projectSettlement/getNextPeriod',
            params
        })
    },
    //清单模糊搜索
    searchDetailedList (params) {
        return httpGet({
            url: '/subcontract/subpackageApply/getListByKey',
            params
        })
    },
    //获取施工日志工程量
    getListCanSettleQuantity (params) {
        return httpPost({
            url: '/projectsettle/projectSettlement/listCanSettleQuantity',
            params
        })
    },
    //获取截止上期末累计结算金额
    getPreviousTotalAmount (params) {
        return httpGet({
            url: '/projectsettle/projectSettlement/getPreviousTotalAmount',
            params
        })
    }
    // 获取工程材料理论量
    // getEngineeringTheoreticalQuantity(){

    // }
    // 获取材料理论/实际消耗
    // getEngineeringTheoreticalQuantityActualConsumption(){

    // }
}

export default request